<?php

class PhoneController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

	public function detailAction(){
		$phoneId  = $this->_request->getParam("id");
		$phoneDb = new Application_Model_DbTable_Phone();
		$phone = $phoneDb->find($phoneId)->current();
		$currentCatagory = $phone->findParentRow("Application_Model_DbTable_Catagory");
		$tags = $phone->findDependentRowset("Application_Model_DbTable_Tag");		
		
		$this->view->phone = $phone;
		$this->view->currentCatagory = $currentCatagory;
		$this->view->tags = $tags;
	}
	
	
}

